import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Message from '../views/carMessage/Message.vue'
import BasicCarparameter from '../views/basic/BasicCarparameter.vue'
import BasicAuxiliary  from '../views/basic/BasicAuxiliary.vue'
import BasicMotor  from '../views/basic/BasicMotor.vue'
import BasicTransmission  from '../views/basic/BasicTransmission.vue'
import BasicStructures  from '../views/basic/BasicStructures.vue'
import BasicChassis  from '../views/basic/BasicChassis.vue'
import BasicExternals  from '../views/basic/BasicExternals.vue'
import BasicSecuritys  from '../views/basic/BasicSecuritys.vue'
import Orders  from '../views/order/Orders.vue'
import Stocks  from '../views/stock/Stocks.vue'
import SysUser  from '../views/system/SysUser.vue'
import SysRole  from '../views/system/SysRole.vue'
import SysAdmin  from '../views/system/SysAdmin.vue'
import Login  from '../views/Login.vue'




Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Login',
    component: Login,
    hidden:true
  } ,
  {
    path: '/login',
    name: 'Login',
    component: Login,
    hidden:true
  },
  {
    path: '/home',
    name: '车辆信息管理',
    component: Home,
    children:[
      {
        path: '/home/message',
        name: '车辆信息',
        component: Message
      }
    ]
  },{
    path: '/home',
    name: '车辆基本信息管理',
    component: Home,
    children:[
      {
        path: '/home/BasicCarparameter',
        name: '基本参数',
        component: BasicCarparameter
      },{
        path: '/home/BasicMotor',
        name: '发动机',
        component: BasicMotor
      },{
        path: '/home/BasicTransmission',
        name: '变速箱',
        component: BasicTransmission
      },{
        path: '/home/BasicStructures',
        name: '车身结构',
        component: BasicStructures
      },{
        path: '/home/BasicChassis',
        name: '底盘转向',
        component: BasicChassis
      },{
        path: '/home/BasicSecuritys',
        name: '安全配置',
        component: BasicSecuritys
      },{
        path: '/home/BasicAuxiliary',
        name: '辅助操控配置',
        component: BasicAuxiliary
      },{
        path: '/home/BasicExternals',
        name: '外部配置',
        component: BasicExternals
      }
    ]
  },{
    path: '/home',
    name: '订单信息管理',
    component: Home,
    children:[
      {
        path: '/home/Orders',
        name: '订单信息',
        component: Orders
      }
    ]
  },{
    path: '/home',
    name: '库存管理',
    component: Home,
    children:[
      {
        path: '/home/Stocks',
        name: '库存信息',
        component: Stocks
      }
    ]
  },{
    path: '/home',
    name: '系统管理',
    component: Home,
    children:[
      {
        path: '/home/SysUser',
        name: '用户管理',
        component: SysUser
      }, {
        path: '/home/SysRole',
        name: '角色管理',
        component: SysRole
      }, {
        path: '/home/SysAdmin',
        name: '管理员管理',
        component: SysAdmin
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
